Repository navigation
docs: README with contents and ADR index; log a failed left-open check - #18
Merged
Merged
Conversation
…ed left-open check README: a table of contents, an ADR index, and sections for connecting, magic-number scope (symbol, ticket, magic 0 on a single-bot account, netting), error kinds with what to do, batch failures and a checklist before trading real money. Links to repository files are absolute GitHub URLs, because PyPI does not resolve relative ones. check_file_length: the top-level README.md may have up to 600 lines (the owner's call); every other file keeps 300. I chose a higher ceiling over no limit, because no limit would let a pasted log through unnoticed. magic_scope: a defaulted close/cancel that matched nothing dropped an Err from its follow-up listing of other magics, so Ok([]) could read as "flat" in silence. It now logs a warning. The call stays Ok, because it did what was asked, and an Err would invite a retry of an action that already ran.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Goal
The owner asked for a README that holds every essential, starts with a table of contents and links the ADRs. It may exceed 300 lines.
What changed
scripts/check_file_length.py: the top-levelREADME.mdmay have up to 600 lines. Every other file keeps 300. A ceiling rather than no limit, so that a pasted log cannot slip through. Tests:tests/unit/test_check_file_length.py.magic_scope: a defaulted close/cancel that matched nothing used to drop anErrfrom its follow-up listing of other magics.Ok([])could then read as "flat" without any warning on netting. It now logs a warning that it could not check. The call staysOk. This was in 3.0.0 and was found by review round 2. ADR 0011 and the CHANGELOG are updated.Verification
close_positions("EURGBP")andcancel_pending_orders("EURGBP"), with and withoutANY_MAGIC, left a EURUSD position and a EURUSD limit order untouched.Review history
Two
/code-review highrounds, with the severity filter fixed in advance: the README contradicts the code, or the guard breaks.ticket=None) and forOUTCOME_UNKNOWN;NO_PRICEretries were not mentioned.magic=0;REJECTEDcovers "already closed" (10036);ticketwith an explicitmagicstill filters;INVALID_FILLINGis not fixable by the caller;Named debt
blob/master. The README frozen on PyPI for a release shows the docs as they are on master later, not as they were for that release. Pinning links to the tag at release time would fix this but needs a release step; it was not done here.